Page({


	data: {
	showOrHide: false,
	animationData: null
	},


	onLoad: function(options) {

	},
	getLocation() {
		wx.openLocation({
			latitude: 22.938684026684538, 
			longitude: 113.36204734580261,
			name: "脑还同",
			address: '东方数码通讯城'
		})
	},
	
	makePhoneCall() {
		wx.makePhoneCall({
			phoneNumber: '020-84787684'
	
		})
	},
	
	
	clickMe(){
		this.showModel();
	},
	
	showModel(){
		let animation = wx.createAnimation({
			duration:200,
			timingFunction:"linear"
		});
		this.animation = animation;
		animation.translateY(500).step();
		this.setData({
			animationData: animation.export(),
			showOrHide: true
		});
		setTimeout(() => {
			animation.translateY(0).step();
			this.setData({
				animationData: animation.export()
			})
		},200)
	},
	hideModel(){
		let animation = wx.createAnimation({
			duration:200,
			timingFunction:"linear"
		});
		this.animation = animation;
		animation.translateY(400).step();
		this.setData({
			animationData: animation.export(),
		});
		setTimeout(() => {
			animation.translateY(0).step();
			this.setData({
				animationData: animation.export(),
				showOrHide: false
			})
		},200)
	}
})
